package com.yangwp.doutu.Utils;

import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;

import java.io.File;
import java.util.List;

public class FileUtils {

    public static final String BASE_PATH = "/data/doutu/";
    public static final String IMAGE_PATH = BASE_PATH + "image/";
    public static final String ORIGIN_HEAD_PATH = BASE_PATH + "head/";

    public static List<String> getOriginHeadList(){
        List<String> heads = Lists.newArrayList();
        File file = new File(ORIGIN_HEAD_PATH);
        if(file.exists() && file.isDirectory()){
            for(File imgFile : file.listFiles()){
                if(!imgFile.isDirectory()){
                    String fileName = imgFile.getName();
                    heads.add(fileName);
                }
            }
        }
        return heads;
    }

}
